package com.wang.interview.designmode.watcher;

/**
 * @author: wang
 * @date: 2021/8/2 11:25
 * @description:
 */
public class ALiYunObservers implements Observers {

    private float temperature;
    private float pressure;

    @Override
    public void update(float temperature, float pressure) {
        this.temperature = temperature;
        this.pressure = pressure;
        display();
    }

    public void display() {
        System.out.println("这里是ALiYun");
        System.out.println("现在温度为："+temperature);
        System.out.println("现在湿度为："+pressure);
    }
}
